package com.application.fabric.加密算法;

import org.junit.jupiter.api.Test;

import java.util.Base64;

public class base64 {
    @Test
    public void test(){
//        System.out.println("test");
        String originalString = "hatelys everyday testcharlong";
        String encodedString = Base64.getEncoder().encodeToString(originalString.getBytes());
        System.out.println("Encoded string: " + encodedString);
        byte[] decodedBytes = Base64.getDecoder().decode(encodedString);
        String decodedString = new String(decodedBytes);
        System.out.println("Decoded string: " + decodedString);


    }
}
